﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<KnitwearCompany.Models.User>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Пользователи
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Пользователи</h2>
        <table width='900px'>
        <tr>
            <th>
                id
            </th>
            <th>
                Логин
            </th>
            <th>
                Администратор
            </th>
            <th></th>
        </tr>
    <% foreach (var item in Model) { %>
        <tr>
            <td>
                <%= Html.Encode(item.Id) %>
            </td>
            <td>
                <%= Html.Encode(item.Login) %>
            </td>
            <td>
                <%= Html.Encode(item.IsAdmin) %>
            </td>
            <td>
                <%= Html.ActionLink("Поменять роль", "EditUserRole", "Account", new { ID = item.Id }, null) %> |
                <%= Html.ActionLink("Удалить", "RemoveUser", "Account", new { ID = item.Id }, null)%>
            </td>
        </tr>
    <% } %>
    </table>

    <br/><br/>
    <%: Html.ActionLink("Назад", "Admin", "Admin") %>
</asp:Content>
